package com.redeemer150.oj.controller;


import com.redeemer150.oj.judge.JudgeService;
import com.redeemer150.oj.model.entity.QuestionSubmit;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 炼金术士
 * @version 1.0
 * @description: TODO
 * @date 2025/5/20 14:33
 */
@RestController
@RequestMapping("/judge")
@Slf4j
public class JudgeController {

    @Resource
    private JudgeService judgeService;
    /**
     * 判题
     * @param questionSubmitId
     * @return
     */
    @PostMapping("/do")
    public QuestionSubmit doJudge(@RequestParam("questionSubmitId") long questionSubmitId){
        return judgeService.doJudge(questionSubmitId);
    }
}
